using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class ShopMan : Npc
{
    [Header("商店等级")]
    public string level = "A";
    [Header("coll")]
    public GameObject collObj;

    private void Start()
    {
        collObj = transform.Find("CheckPosOne").gameObject;

        //隐藏
        collObj.GetComponent<Collider2D>().enabled = false;
    }
    private void OnMouseDown()
    {
        if (GameManager.Instance.canOprate==false) return;

        SceneItemManager.instance.clickEnemyRight = true;
        collObj.GetComponent<Collider2D>().enabled = true;
        SceneItemManager.instance.SetClickEnemy(gameObject);
    }
    //打开UI
    public void OpenShopUI()
    {
        PanelManager.Open<ShopPanel>(level);
        collObj.GetComponent<Collider2D>().enabled = false;
    }
}
